* Wealth index calculation. Trevor Croft, 04/15/2016. Afghanistan DHS 2015. cd 'C:\WealthIndex\AF71'. include file='WEALTH_ASSETS.sps'. missing values QH120A (999.9). execute. set tvars=both. * Macro definitions to perform some recoding automatically. * Note: Do not use an asterisk in front of a macro name to try to comment it out - it will run any way because of the way the macros are expanded. * Delete the line instead or change the spelling of the macro in the comment. * Do not use the names of macros in comments - they will also be expanded too, and likely will fail. *{Create binary variables based on condition and give label }. define dichotomize( !positional !enclose('(',')') / !positional !tokens(1) / !positional !tokens(1) ) compute !2=0. if (!1) !2=1. variable labels !2 !3. value labels !2 0 'No' 1 'Yes'. formats !2 (f1.0). !enddefine. *(Separate shared toilets from non-shared toilets). define shared_fac( !positional !tokens(1) / !positional !tokens(1) / !positional !tokens(1) ). compute !2 = 0. do if (QH108=1). + if (!1=1) !2 = 1. + compute !1 = 0. end if. variable labels !2 !3. value labels !2 0 'No' 1 'Yes'. formats !2 (f1.0). !enddefine. *{Reset missing values to 'does not have', change 2 code to 0}. define no2zero( !positional !tokens(1) ) if (missing(!1) | !1<>1) !1=0. value labels !1 0 'No' 1 'Yes'. !enddefine. *{Construct Variables}. * Source of drinking water. dichotomize (QH102=11) QH102_11 "Source of drinking water: Piped - into dwelling". dichotomize (QH102=12) QH102_12 "Source of drinking water: Piped - to yard/plot". dichotomize (QH102=13) QH102_13 "Source of drinking water: Piped - public tap / standpipe". dichotomize (QH102=21) QH102_21 "Source of drinking water: Tube well or borehole". dichotomize (QH102=31) QH102_31 "Source of drinking water: Dug well - protected". dichotomize (QH102=32) QH102_32 "Source of drinking water: Dug well - unprotected". dichotomize (QH102=41) QH102_41 "Source of drinking water: Spring - protected". dichotomize (QH102=42) QH102_42 "Source of drinking water: Spring - unprotected". dichotomize (QH102=51) QH102_51 "Source of drinking water: Rainwater". dichotomize (QH102=61) QH102_61 "Source of drinking water: Tanker truck". dichotomize (QH102=71) QH102_71 "Source of drinking water: Cart with small tank". dichotomize (QH102=81) QH102_81 "Source of drinking water: Surface water (river/dam/lake/pond/stream/canal/irrigation channel)". dichotomize (QH102=91) QH102_91 "Source of drinking water: Bottled water". dichotomize (QH102=96) QH102_96 "Source of drinking water: Other". * Type of toilet facility. dichotomize (QH107=11) QH107_11 "Type of toilet facility: Flush - to piped sewer system". dichotomize (QH107=12) QH107_12 "Type of toilet facility: Flush - to septic tank". dichotomize (QH107=13) QH107_13 "Type of toilet facility: Flush - to pit latrine". dichotomize (QH107=14) QH107_14 "Type of toilet facility: Flush - to somewhere else". dichotomize (QH107=15) QH107_15 "Type of toilet facility: Flush - don't know where". dichotomize (QH107=21) QH107_21 "Type of toilet facility: Pit latrine - ventilated improved pit (VIP)". dichotomize (QH107=22) QH107_22 "Type of toilet facility: Pit latrine - with slab". dichotomize (QH107=23) QH107_23 "Type of toilet facility: Pit latrine - without slab/open pit". dichotomize (QH107=31) QH107_31 "Type of toilet facility: Composting toilet". dichotomize (QH107=41) QH107_41 "Type of toilet facility: Bucket toilet". dichotomize (QH107=51) QH107_51 "Type of toilet facility: Single vault". dichotomize (QH107=52) QH107_52 "Type of toilet facility: Double vault". dichotomize (QH107=61) QH107_61 "Type of toilet facility: Eco sanitation". dichotomize (QH107=71) QH107_71 "Type of toilet facility: No facility, bush, field". dichotomize (QH107=96) QH107_96 "Type of toilet facility: Other". shared_fac QH107_11 QH107_11_sh "Type of toilet facility: Flush - to piped sewer system - shared". shared_fac QH107_12 QH107_12_sh "Type of toilet facility: Flush - to septic tank - shared". shared_fac QH107_13 QH107_13_sh "Type of toilet facility: Flush - to pit latrine - shared". shared_fac QH107_14 QH107_14_sh "Type of toilet facility: Flush - to somewhere else - shared". shared_fac QH107_15 QH107_15_sh "Type of toilet facility: Flush - don't know where - shared". shared_fac QH107_21 QH107_21_sh "Type of toilet facility: Pit latrine - ventilated improved pit (VIP) - shared". shared_fac QH107_22 QH107_22_sh "Type of toilet facility: Pit latrine - with slab - shared". shared_fac QH107_23 QH107_23_sh "Type of toilet facility: Pit latrine - without slab/open pit - shared". shared_fac QH107_31 QH107_31_sh "Type of toilet facility: Composting toilet - shared". shared_fac QH107_41 QH107_41_sh "Type of toilet facility: Bucket toilet - shared". shared_fac QH107_51 QH107_51_sh "Type of toilet facility: Single vault - shared". shared_fac QH107_52 QH107_52_sh "Type of toilet facility: Double vault - shared". shared_fac QH107_61 QH107_61_sh "Type of toilet facility: Eco sanitation - shared". shared_fac QH107_96 QH107_96_sh "Type of toilet facility: Other - shared". * Electricity. no2zero QH110A. * Radio. no2zero QH110B. * Television. no2zero QH110C. * Mobile telephone. no2zero QH110D. * Non-mobile telephone. no2zero QH110E. * Refrigerator. no2zero QH110F. * Table. no2zero QH110G. * Chair. no2zero QH110H. * Sofa. no2zero QH110I. * Bed. no2zero QH110J. * Cupboard. no2zero QH110K. * Stand fan. no2zero QH110L. * Generator. no2zero QH110M. * Sewing machine. no2zero QH110N. * Computer. no2zero QH110O. * Type of cooking fuel. dichotomize (QH111=1) QH111_1 "Type of cooking fuel: Electricity". dichotomize (QH111=2) QH111_2 "Type of cooking fuel: LPG". dichotomize (QH111=3) QH111_3 "Type of cooking fuel: Natural gas". dichotomize (QH111=4) QH111_4 "Type of cooking fuel: Biogas". dichotomize (QH111=6) QH111_6 "Type of cooking fuel: Coal, lignite". dichotomize (QH111=7) QH111_7 "Type of cooking fuel: Charcoal". dichotomize (QH111=8) QH111_8 "Type of cooking fuel: Wood". dichotomize (QH111=9) QH111_9 "Type of cooking fuel: Straw/shrubs/grass". dichotomize (QH111=10) QH111_10 "Type of cooking fuel: Agricultural crop". dichotomize (QH111=11) QH111_11 "Type of cooking fuel: Animal dung". dichotomize (QH111=95) QH111_95 "Type of cooking fuel: No food cooked in household". dichotomize (QH111=96) QH111_96 "Type of cooking fuel: Other". * only one case of kerosene; group with other dichotomize (QH111=5) QH111_5 "Type of cooking fuel: Kerosene". if (qh111=5) QH111_96=1. * Main floor material. dichotomize (QH114=11) QH114_11 "Main floor material: Earth/sand/dung". *group natural materials. if (qh114=12) QH114_11=1. dichotomize (QH114=13) QH114_13 "Main floor material: Mud and hay". dichotomize (QH114=21) QH114_21 "Main floor material: Wood planks". dichotomize (QH114=31) QH114_31 "Main floor material: Parquet or polished wood". dichotomize (QH114=32) QH114_32 "Main floor material: Vinyl or asphalt strips". dichotomize (QH114=33) QH114_33 "Main floor material: Ceramic tiles". dichotomize (QH114=34) QH114_34 "Main floor material: Cement". dichotomize (QH114=35) QH114_35 "Main floor material: Rug or mat". dichotomize (QH114=36) QH114_36 "Main floor material: Carpet". dichotomize (QH114=96) QH114_96 "Main floor material: Other". * Main roof material. dichotomize (QH115=11) QH115_11 "Main roof material: No roof". dichotomize (QH115=12) QH115_12 "Main roof material: Thatch/bushes/grass". dichotomize (QH115=13) QH115_13 "Main roof material: Sod/mud with grass". dichotomize (QH115=21) QH115_21 "Main roof material: Rustic mat". dichotomize (QH115=22) QH115_22 "Main roof material: Mud and hay". dichotomize (QH115=23) QH115_23 "Main roof material: Wood planks". dichotomize (QH115=24) QH115_24 "Main roof material: Cardboard/cloth/tent". dichotomize (QH115=31) QH115_31 "Main roof material: Metal". dichotomize (QH115=32) QH115_32 "Main roof material: Wood". dichotomize (QH115=33) QH115_33 "Main roof material: Calamine/cement fiber". dichotomize (QH115=34) QH115_34 "Main roof material: Ceramic tiles". dichotomize (QH115=35) QH115_35 "Main roof material: Cement". dichotomize (QH115=36) QH115_36 "Main roof material: Roofing shingles". dichotomize (QH115=96) QH115_96 "Main roof material: Other". * Main wall material. dichotomize (QH116=11) QH116_11 "Main wall material: No walls". dichotomize (QH116=12) QH116_12 "Main wall material: Prepared mud". dichotomize (QH116=13) QH116_13 "Main wall material: Dirt". dichotomize (QH116=21) QH116_21 "Main wall material: Hay with mud". dichotomize (QH116=22) QH116_22 "Main wall material: Stone with mud". dichotomize (QH116=23) QH116_23 "Main wall material: Uncovered adobe". dichotomize (QH116=24) QH116_24 "Main wall material: Plywood". dichotomize (QH116=25) QH116_25 "Main wall material: Cardboard/cloth/tent". dichotomize (QH116=26) QH116_26 "Main wall material: Reused wood". dichotomize (QH116=31) QH116_31 "Main wall material: Cement". dichotomize (QH116=32) QH116_32 "Main wall material: Stone with lime/cement". dichotomize (QH116=33) QH116_33 "Main wall material: Bricks". dichotomize (QH116=34) QH116_34 "Main wall material: Cement blocks". dichotomize (QH116=35) QH116_35 "Main wall material: Covered adobe". dichotomize (QH116=36) QH116_36 "Main wall material: Wood planks/shingles". dichotomize (QH116=96) QH116_96 "Main wall material: Other". * Watch. no2zero QH118A. * Bicycle. no2zero QH118B. * Motorcycle or scooter. no2zero QH118C. * Animal-drawn cart. no2zero QH118D. * Car or truck. no2zero QH118E. * Tractor. no2zero QH118F. * Rickshaw. no2zero QH118G. * Cows/bulls. if (missing(QH122A) | QH121 <> 1) QH122A=0. missing values QH122A (99). compute QH122A_0 = (QH122A = 0). compute QH122A_1 = (QH122A >= 1 & QH122A <= 4). compute QH122A_2 = (QH122A >= 5 & QH122A <= 9). compute QH122A_3 = (QH122A >= 10 & QH122A <= 98). variable labels QH122A_0 'Cows/bulls: None' /QH122A_1 'Cows/bulls: 1-4' /QH122A_2 'Cows/bulls: 5-9' /QH122A_3 'Cows/bulls: 10+'. * Other cattle. if (missing(QH122B) | QH121 <> 1) QH122B=0. missing values QH122B (99). compute QH122B_0 = (QH122B = 0). compute QH122B_1 = (QH122B >= 1 & QH122B <= 4). compute QH122B_2 = (QH122B >= 5 & QH122B <= 9). compute QH122B_3 = (QH122B >= 10 & QH122B <= 98). variable labels QH122B_0 'Other cattle: None' /QH122B_1 'Other cattle: 1-4' /QH122B_2 'Other cattle: 5-9' /QH122B_3 'Other cattle: 10+'. * Horses/donkeys/mules. if (missing(QH122C) | QH121 <> 1) QH122C=0. missing values QH122C (99). compute QH122C_0 = (QH122C = 0). compute QH122C_1 = (QH122C >= 1 & QH122C <= 4). compute QH122C_2 = (QH122C >= 5 & QH122C <= 9). compute QH122C_3 = (QH122C >= 10 & QH122C <= 98). variable labels QH122C_0 'Horses/donkeys/mules: None' /QH122C_1 'Horses/donkeys/mules: 1-4' /QH122C_2 'Horses/donkeys/mules: 5-9' /QH122C_3 'Horses/donkeys/mules: 10+'. * Goats. if (missing(QH122D) | QH121 <> 1) QH122D=0. missing values QH122D (99). compute QH122D_0 = (QH122D = 0). compute QH122D_1 = (QH122D >= 1 & QH122D <= 4). compute QH122D_2 = (QH122D >= 5 & QH122D <= 9). compute QH122D_3 = (QH122D >= 10 & QH122D <= 98). variable labels QH122D_0 'Goats: None' /QH122D_1 'Goats: 1-4' /QH122D_2 'Goats: 5-9' /QH122D_3 'Goats: 10+'. * Sheep. if (missing(QH122E) | QH121 <> 1) QH122E=0. missing values QH122E (99). compute QH122E_0 = (QH122E = 0). compute QH122E_1 = (QH122E >= 1 & QH122E <= 4). compute QH122E_2 = (QH122E >= 5 & QH122E <= 9). compute QH122E_3 = (QH122E >= 10 & QH122E <= 98). variable labels QH122E_0 'Sheep: None' /QH122E_1 'Sheep: 1-4' /QH122E_2 'Sheep: 5-9' /QH122E_3 'Sheep: 10+'. * Camels. if (missing(QH122F) | QH121 <> 1) QH122F=0. missing values QH122F (99). compute QH122F_0 = (QH122F = 0). compute QH122F_1 = (QH122F >= 1 & QH122F <= 4). compute QH122F_2 = (QH122F >= 5 & QH122F <= 9). compute QH122F_3 = (QH122F >= 10 & QH122F <= 98). variable labels QH122F_0 'Camels: None' /QH122F_1 'Camels: 1-4' /QH122F_2 'Camels: 5-9' /QH122F_3 'Camels: 10+'. * Chickens/poultry. if (missing(QH122G) | QH121 <> 1) QH122G=0. missing values QH122G (99). compute QH122G_0 = (QH122G = 0). compute QH122G_1 = (QH122G >= 1 & QH122G <= 9). compute QH122G_2 = (QH122G >= 10 & QH122G <= 29). compute QH122G_3 = (QH122G >= 30 & QH122G <= 98). variable labels QH122G_0 'Chickens/poultry: None' /QH122G_1 'Chickens/poultry: 1-9' /QH122G_2 'Chickens/poultry: 10-29' /QH122G_3 'Chickens/poultry: 30+'. * Ducks. if (missing(QH122H) | QH121 <> 1) QH122H=0. missing values QH122H (99). compute QH122H_0 = (QH122H = 0). compute QH122H_1 = (QH122H >= 1 & QH122H <= 9). compute QH122H_2 = (QH122H >= 10 & QH122H <= 29). compute QH122H_3 = (QH122H >= 30 & QH122H <= 98). variable labels QH122H_0 'Ducks: None' /QH122H_1 'Ducks: 1-9' /QH122H_2 'Ducks: 10-29' /QH122H_3 'Ducks: 30+'. * Bank account. no2zero QH123. * Hectares for agricultural land. compute landarea = QH120A. if (missing(QH120A) | QH120A >= 999.8) landarea = 999.9. if (missing(QH119) | QH119 <> 1) landarea=0. missing values landarea (999.9). *{Members per sleeping room}. if (hhusual=0) hhusual=hhslept. if (QH117>0) memsleep=trunc(hhusual/QH117). if (QH117=0) memsleep=hhusual. if (missing(QH117) or QH117>=99 or memsleep>=98) memsleep=99. variable labels memsleep 'Number of members per sleeping room'. value labels memsleep 0 'Less than 1 per room'. formats memsleep (f2.0). missing values memsleep (99). * Compute urban and rural variables coded (1/0) for filters later. compute urban=(QHTYPE = 1). compute rural=(QHTYPE = 2). variable labels urban 'Urban' / rural 'Rural'. value labels urban 1 'Urban' / rural 1 'Rural'. formats urban rural (f1.0). execute. * Check on indicator variable creation. frequencies variables=QHTYPE to LAND. * Toilet facility by shared/not shared. crosstabs /tables=QH107 by QH108. * Land area by units - if there are separate units - need to convert them to one unit. *crosstabs /tables=QH120N by QH120U. frequencies variables= QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea . *URBAN FREQUENCIES. filter off. filter by urban. execute. frequencies variables= QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea . *CONCLUSION FROM FREQUENCIES: In urban areas, remove vinyl (QH114_32) , cardboard QH116_25, reused wood QH116_26, QH122C_3 horses 10+, all camels (QH122F), ducks 30+ QH122H_3 NOTE: 10+cattle QH122B_3 only has 1 case but keeping it in order to keep other cattle groupings *RURAL FREQUENCIES. filter off. filter by rural. execute. frequencies variables= QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea . *CONCLUSION FROM FREQUENCIES: rural area has sufficient cases (>1) for all variables. * Turn off weights before all factor analysis. weight off. * Name the dataset window for the HH data for use later. dataset name assets. save outfile='assets.sav'. *** Test Factor Analysis. filter off. execute. factor /variables QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea /missing meansub /analysis QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /method=correlation. *** Common Factor analysis ***. ** Removed area-specific variables **. ** Agricultural animal variables excluded ** Land area excluded ** Any others ?. *** Common Factor Analysis. filter off. execute. factor /variables QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep /missing meansub /analysis QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL com) /method=correlation. *** Urban Factor Analysis. filter off. filter by urban. execute. factor /variables QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 landarea /missing meansub /analysis QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 landarea /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL urb) /method=correlation. *** Rural Factor Analysis. filter off. filter by rural. execute. factor /variables QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea /missing meansub /analysis QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea /print univariate initial extraction fscore /criteria factors(1) iterate(25) /extraction pc /rotation norotate /save reg(ALL rur) /method=correlation. * Label the created score variables. rename variables (com1 urb1 rur1=comscore urbscore rurscore). variable labels comscore 'Common wealth score' /urbscore 'Urban wealth score' /rurscore 'Rural wealth score'. * Add a variable used for linking later. filter off. string rowtype_ (A8). compute rowtype_ = 'EST'. * Calculate regressions. ** Area=urban. filter off. filter by urban. execute. * Declare a dataset to be written to in the regression. dataset declare urbancorv. * Run regression of comscore with urbscore. regression /missing listwise /statistics coeff outs R anova /criteria=pin(.05) pout(.10) /noorigin /dependent comscore /method=enter urbscore /outfile=corv(urbancorv). * Activate file of output from regression. dataset activate urbancorv. * Drop all rows of output except the coefficients. select if (rowtype_ = 'EST'). execute. * Delete unnecessary variables before merging. delete variables DEPVAR_ VARNAME_. * Rename variables containing the constant and the coefficient. rename variables CONST_=urbconst urbscore=urbcoeff. * Re-activate the main household data. dataset activate assets. * merge the coefficients. match files /file = * /table = urbancorv /by ROWTYPE_. execute. * Calculate regressions. ** Area=rural. filter off. filter by rural. execute. * Declare a dataset to be written to in the regression. dataset declare ruralcorv. * Run regression of comscore with rurscore. regression /missing listwise /statistics coeff outs R anova /criteria=pin(.05) pout(.10) /noorigin /dependent comscore /method=enter rurscore /outfile=corv(ruralcorv). * Activate file of output from regression. dataset activate ruralcorv. * Drop all rows of output except the coefficients. select if (rowtype_ = 'EST'). execute. * Delete unnecessary variables before merging. delete variables DEPVAR_ VARNAME_. * Rename variables containing the constant and the coefficient. rename variables CONST_=rurconst rurscore=rurcoeff. * Re-activate the main household data. dataset activate assets. * merge the coefficients. match files /file = * /table = ruralcorv /by ROWTYPE_. execute. dataset close urbancorv. dataset close ruralcorv. dataset activate assets. filter off. *** Calculate combined wealth score from Urban and Rural Scores. * Use coefficients from urban and rural regressions above. compute combscor=0. print formats combscor (f11.5). write formats combscor (f11.5). ** Urban. if (urban = 1) combscor=urbconst+urbcoeff*urbscore. ** Rural. if (rural = 1) combscor=rurconst+rurcoeff*rurscore. variable labels combscor 'Combined national wealth score'. execute. compute hhwt = QHWEIGHT/1000000. variable labels hhwt 'HH weights'. weight by hhwt. filter off. execute. frequencies variables=combscor comscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. filter by urban. execute. frequencies variables=combscor urbscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. filter by rural. execute. frequencies variables=combscor rurscore /format=notable /ntiles=5 /statistics=stddev mean /histogram normal /order=analysis. filter off. execute. *Calculate quintiles and scores for data file. compute hhmemwt=QHWEIGHT*hhusual/1000000. weight by hhmemwt. variable labels hhmemwt 'HH members weighting for index'. filter off. filter by urban. execute. rank variables=urbscore (A) /rank /ntiles (5) /print=yes /ties=mean. filter off. filter by rural. execute. rank variables=rurscore (A) /rank /ntiles (5) /print=yes /ties=mean. filter off. execute. rank variables=combscor (A) /rank /ntiles (5) /print=yes /ties=mean. variable labels ncombsco 'Combined wealth index' /nurbscor 'Urban wealth index' /nrurscor 'Rural wealth index'. value labels ncombsco nurbscor nrurscor 1 'Lowest' 2 'Second' 3 'Middle' 4 'Fourth' 5 'Highest'. *** Check on quintiles. frequencies variables=ncombsco nurbscor nrurscor. weight by hhwt. ctables /table ( QH102_11+QH102_12+QH102_13+QH102_21+QH102_31+QH102_32+QH102_41+QH102_42+QH102_51+QH102_61+QH102_71+QH102_81+QH102_91+QH102_96+ QH107_11+QH107_12+QH107_13+QH107_14+QH107_15+QH107_21+QH107_22+QH107_23+QH107_31+QH107_41+QH107_51+QH107_52+QH107_61+QH107_71+QH107_96+ QH107_11_sh+QH107_12_sh+QH107_13_sh+QH107_14_sh+QH107_15_sh+QH107_21_sh+QH107_22_sh+QH107_23_sh+QH107_31_sh+QH107_41_sh+QH107_51_sh+QH107_52_sh+QH107_61_sh+ QH107_96_sh+QH110A+QH110B+QH110C+QH110D+QH110E+QH110F+QH110G+QH110H+QH110I+QH110J+QH110K+QH110L+QH110M+QH110N+QH110O+ QH111_1+QH111_2+QH111_3+QH111_4+QH111_6+QH111_7+QH111_8+QH111_9+QH111_10+QH111_11+QH111_95+QH111_96+ QH114_11+QH114_13+QH114_21+QH114_31+QH114_32+QH114_33+QH114_34+QH114_35+QH114_36+QH114_96+ QH115_11+QH115_12+QH115_13+QH115_21+QH115_22+QH115_23+QH115_24+QH115_31+QH115_32+QH115_33+QH115_34+QH115_35+QH115_36+QH115_96+ QH116_11+QH116_12+QH116_13+QH116_21+QH116_22+QH116_23+QH116_24+QH116_25+QH116_26+QH116_31+QH116_32+QH116_33+QH116_34+QH116_35+QH116_36+QH116_96+ QH118A+QH118B+QH118C+QH118D+QH118E+QH118F+QH118G+QH123+HOUSE+LAND+memsleep+ QH122A_0+QH122A_1+QH122A_2+QH122A_3+QH122B_0+QH122B_1+QH122B_2+QH122B_3+ QH122C_0+QH122C_1+QH122C_2+QH122C_3+QH122D_0+QH122D_1+QH122D_2+QH122D_3+ QH122E_0+QH122E_1+QH122E_2+QH122E_3+QH122F_0+QH122F_1+QH122F_2+QH122F_3+ QH122G_0+QH122G_1+QH122G_2+QH122G_3+QH122H_0+QH122H_1+QH122H_2+QH122H_3+landarea )[S][Mean F8.3] by (ncombsco+nurbscor+nrurscor)[C] /slabels visible=no. * Alternative instead of ctables. *means tables= QH102_11 QH102_12 QH102_13 QH102_21 QH102_31 QH102_32 QH102_41 QH102_42 QH102_51 QH102_61 QH102_71 QH102_81 QH102_91 QH102_96 QH107_11 QH107_12 QH107_13 QH107_14 QH107_15 QH107_21 QH107_22 QH107_23 QH107_31 QH107_41 QH107_51 QH107_52 QH107_61 QH107_71 QH107_96 QH107_11_sh QH107_12_sh QH107_13_sh QH107_14_sh QH107_15_sh QH107_21_sh QH107_22_sh QH107_23_sh QH107_31_sh QH107_41_sh QH107_51_sh QH107_52_sh QH107_61_sh QH107_96_sh QH110A QH110B QH110C QH110D QH110E QH110F QH110G QH110H QH110I QH110J QH110K QH110L QH110M QH110N QH110O QH111_1 QH111_2 QH111_3 QH111_4 QH111_6 QH111_7 QH111_8 QH111_9 QH111_10 QH111_11 QH111_95 QH111_96 QH114_11 QH114_13 QH114_21 QH114_31 QH114_32 QH114_33 QH114_34 QH114_35 QH114_36 QH114_96 QH115_11 QH115_12 QH115_13 QH115_21 QH115_22 QH115_23 QH115_24 QH115_31 QH115_32 QH115_33 QH115_34 QH115_35 QH115_36 QH115_96 QH116_11 QH116_12 QH116_13 QH116_21 QH116_22 QH116_23 QH116_24 QH116_25 QH116_26 QH116_31 QH116_32 QH116_33 QH116_34 QH116_35 QH116_36 QH116_96 QH118A QH118B QH118C QH118D QH118E QH118F QH118G QH123 HOUSE LAND memsleep QH122A_0 QH122A_1 QH122A_2 QH122A_3 QH122B_0 QH122B_1 QH122B_2 QH122B_3 QH122C_0 QH122C_1 QH122C_2 QH122C_3 QH122D_0 QH122D_1 QH122D_2 QH122D_3 QH122E_0 QH122E_1 QH122E_2 QH122E_3 QH122F_0 QH122F_1 QH122F_2 QH122F_3 QH122G_0 QH122G_1 QH122G_2 QH122G_3 QH122H_0 QH122H_1 QH122H_2 QH122H_3 landarea by ncombsco nurbscor nrurscor /cells mean count stddev. graph /histogram(normal)=combscor /title= 'Distribution of Households by Wealth Scores'. frequencies variables=combscor /format=notable /ntiles=5 /statistics=stddev minimum maximum semean mean median mode skewness seskew kurtosis sekurt /order=analysis. weight off. filter off. write formats combscor urbscore rurscore (f11.5). * Save final dataset of assets. save outfile='assets.sav'. *** Write out scores file. write outfile='scores.dat' table /QHCLUST QHNUMBER combscor ncombsco urbscore nurbscor rurscore nrurscor. execute.